import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        { path: '/', redirect: '/movie' },
        { path: '/home', component: () => import('./components/Home.vue') },
        {
            path: '/about', component: () => import('./components/About.vue'),
            children: [
                {
                    path: ':id', component: () => import('./components/AboutDetails.vue'),
                    props: true
                }
            ]
        },
        {
            path: '/movie', component: () => import('./components/Movie.vue'),
            children: [
                {
                    name: 'MovieDetails',
                    path: ':id', component: () => import('./components/MovieDetails.vue'),
                    props: true
                }
            ]
        }
    ]
})



export default router
